Optimal. Leaf size=138 \[ -\frac {\left (6 a^2+b^2\right ) \sin ^7(c+d x)}{42 d}+\frac {\left (6 a^2+b^2\right ) \sin ^5(c+d x)}{10 d}-\frac {\left (6 a^2+b^2\right ) \sin ^3(c+d x)}{6 d}+\frac {\left (6 a^2+b^2\right ) \sin (c+d x)}{6 d}-\frac {5 a b \cos ^7(c+d x)}{42 d}-\frac {b \cos ^7(c+d x) (a+b \tan (c+d x))}{6 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 138, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3508, 3486, 2633} \[ -\frac {\left (6 a^2+b^2\right ) \sin ^7(c+d x)}{42 d}+\frac {\left (6 a^2+b^2\right ) \sin ^5(c+d x)}{10 d}-\frac {\left (6 a^2+b^2\right ) \sin ^3(c+d x)}{6 d}+\frac {\left (6 a^2+b^2\right ) \sin (c+d x)}{6 d}-\frac {5 a b \cos ^7(c+d x)}{42 d}-\frac {b \cos ^7(c+d x) (a+b \tan (c+d x))}{6 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2633
Rule 3486
Rule 3508
Rubi steps
\begin {align*} \int \cos ^7(c+d x) (a+b \tan (c+d x))^2 \, dx &=-\frac {b \cos ^7(c+d x) (a+b \tan (c+d x))}{6 d}-\frac {1}{6} \int \cos ^7(c+d x) \left (-6 a^2-b^2-5 a b \tan (c+d x)\right ) \, dx\\ &=-\frac {5 a b \cos ^7(c+d x)}{42 d}-\frac {b \cos ^7(c+d x) (a+b \tan (c+d x))}{6 d}-\frac {1}{6} \left (-6 a^2-b^2\right ) \int \cos ^7(c+d x) \, dx\\ &=-\frac {5 a b \cos ^7(c+d x)}{42 d}-\frac {b \cos ^7(c+d x) (a+b \tan (c+d x))}{6 d}-\frac {\left (6 a^2+b^2\right ) \operatorname {Subst}\left (\int \left (1-3 x^2+3 x^4-x^6\right ) \, dx,x,-\sin (c+d x)\right )}{6 d}\\ &=-\frac {5 a b \cos ^7(c+d x)}{42 d}+\frac {\left (6 a^2+b^2\right ) \sin (c+d x)}{6 d}-\frac {\left (6 a^2+b^2\right ) \sin ^3(c+d x)}{6 d}+\frac {\left (6 a^2+b^2\right ) \sin ^5(c+d x)}{10 d}-\frac {\left (6 a^2+b^2\right ) \sin ^7(c+d x)}{42 d}-\frac {b \cos ^7(c+d x) (a+b \tan (c+d x))}{6 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.44, size = 154, normalized size = 1.12 \[ -\frac {-3675 a^2 \sin (c+d x)-735 a^2 \sin (3 (c+d x))-147 a^2 \sin (5 (c+d x))-15 a^2 \sin (7 (c+d x))+1050 a b \cos (c+d x)+630 a b \cos (3 (c+d x))+210 a b \cos (5 (c+d x))+30 a b \cos (7 (c+d x))-525 b^2 \sin (c+d x)+35 b^2 \sin (3 (c+d x))+63 b^2 \sin (5 (c+d x))+15 b^2 \sin (7 (c+d x))}{6720 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.62, size = 94, normalized size = 0.68 \[ -\frac {30 \, a b \cos \left (d x + c\right )^{7} - {\left (15 \, {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{6} + 3 \, {\left (6 \, a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{4} + 4 \, {\left (6 \, a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} + 48 \, a^{2} + 8 \, b^{2}\right )} \sin \left (d x + c\right )}{105 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.50, size = 108, normalized size = 0.78 \[ \frac {b^{2} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{6}\left (d x +c \right )\right )}{7}+\frac {\left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{35}\right )-\frac {2 a b \left (\cos ^{7}\left (d x +c \right )\right )}{7}+\frac {a^{2} \left (\frac {16}{5}+\cos ^{6}\left (d x +c \right )+\frac {6 \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {8 \left (\cos ^{2}\left (d x +c \right )\right )}{5}\right ) \sin \left (d x +c \right )}{7}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 98, normalized size = 0.71 \[ -\frac {30 \, a b \cos \left (d x + c\right )^{7} + 3 \, {\left (5 \, \sin \left (d x + c\right )^{7} - 21 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3} - 35 \, \sin \left (d x + c\right )\right )} a^{2} - {\left (15 \, \sin \left (d x + c\right )^{7} - 42 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3}\right )} b^{2}}{105 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.84, size = 176, normalized size = 1.28 \[ \frac {16\,a^2\,\sin \left (c+d\,x\right )}{35\,d}+\frac {8\,b^2\,\sin \left (c+d\,x\right )}{105\,d}+\frac {8\,a^2\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{35\,d}+\frac {6\,a^2\,{\cos \left (c+d\,x\right )}^4\,\sin \left (c+d\,x\right )}{35\,d}+\frac {a^2\,{\cos \left (c+d\,x\right )}^6\,\sin \left (c+d\,x\right )}{7\,d}+\frac {4\,b^2\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{105\,d}+\frac {b^2\,{\cos \left (c+d\,x\right )}^4\,\sin \left (c+d\,x\right )}{35\,d}-\frac {b^2\,{\cos \left (c+d\,x\right )}^6\,\sin \left (c+d\,x\right )}{7\,d}-\frac {2\,a\,b\,{\cos \left (c+d\,x\right )}^7}{7\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tan {\left (c + d x \right )}\right )^{2} \cos ^{7}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________